package com.jwx.mycar.common;

/**
 * Description:公用类
 */
public class ResultData {
    /**
     * 返回数据枚举
     */
    public enum ResultEnum{
        SUCCESS(1,"成功"),
        FAIl(0,"失败"),
        UNKNOWN_ERROR(-1,"未知错误");

        private int code;
        private String msg;


        ResultEnum(int code,String msg){
            this.code = code;
            this.msg = msg;
        }

        public int getCode(){
            return code;
        }

        public String getMsg(){
            return msg;
        }
    }

    /**
     * 用户角色枚举
     */
    public enum  Role{
        USER("user","用户"),
        ADMIN("damin","管理员");
        private String role;
        private String description;

        Role(String role, String description) {
            this.role = role;
            this.description = description;
        }

        public String getRole() {
            return role;
        }

        public String getDescription() {
            return description;
        }
    }
}
